import Request from '@/api/request'
var request = new Request().http

export interface OrderType {
	// total : number,
	// description : string,
	// 微信用户唯一标识
	openId : string,
	// outTradeNo : string,
	total : number,
	description :string ,
}
export interface ToPayData {
	timeStamp : string,
	nonceStr : string,
	wxPackage : string,
	signType : string,
	paySign : string,
	outTradeNo : string
}
//请求模板
export function toCreateOrder(data : OrderType) {
	return request({
		url: "/applet/order/createOrder",
		method: "Post",
		data
	})
}
export function toCloseOrder(outTradeNo : string) {
	return request({
		url: "/order/closeOrder",
		method: "Get",
		data: {
			outTradeNo
		}
	})
}